package com.peoit.honeycomb.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * 获取配置文件
 * Created by zhouqiu on 2015/10/23.
 */
public final  class PropertiesIn {
    public static String  upload="upload";

    private Properties loadProperties(String resources) {

        // 使用InputStream得到一个资源文件
        InputStream inputstream = this.getClass().getClassLoader().getResourceAsStream(resources);

        // new 一个Properties
        Properties properties = new Properties();
        try {
            // 加载配置文件
            properties.load(inputstream);
            return properties;
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                inputstream.close();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

    }
}
